package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

@Getter
public enum ShopManagerEnum {
    NOT_MANAGER(0, "不是加盟店店长"),
    YES_MANAGER(1, "是加盟店店长");
    private int code;

    private String desc;

    ShopManagerEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ShopManagerEnum getDscByType(Integer type) {
        for (ShopManagerEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
